using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Management.Core.Models.Mapping
{
    public class AdminRoleMap : EntityTypeConfiguration<AdminRole>
    {
        public AdminRoleMap()
        {
            // Primary Key
            this.HasKey(t => t.AdminRoleID);

            // Properties
            // Table & Column Mappings
            this.ToTable("AdminRoles");
            this.Property(t => t.AdminRoleID).HasColumnName("AdminRoleID");
            this.Property(t => t.RoleID).HasColumnName("RoleID");
            this.Property(t => t.AdminID).HasColumnName("AdminID");
        }
    }
}
